module(
    name = "rules_proto_grpc_scala",
    version = "5.7.1",
    compatibility_level = 1,
)

bazel_dep(name = "rules_java", version = "8.15.1")
bazel_dep(name = "rules_jvm_external", version = "6.8")
bazel_dep(name = "rules_proto_grpc", version = "5.7.1")
bazel_dep(name = "rules_proto_grpc_java", version = "5.7.1")
bazel_dep(name = "rules_scala", version = "7.1.1")

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
    name = "maven",
    artifacts = [
        # These are inherited from rules_proto_grpc_java, only add anything extra here
    ],
    known_contributing_modules = [
        "protobuf",
        "rules_proto_grpc_java",
        "rules_proto_grpc_scala",
    ],
    strict_visibility = True,
)
use_repo(maven, "maven")

maven.install(
    name = "rules_proto_grpc_scala_maven_2_12",  # Deconflict
    artifacts = [
        "com.thesamet.scalapb:compilerplugin_2.12:0.11.20",
        "com.thesamet.scalapb:scalapb-runtime_2.12:0.11.20",
        "com.thesamet.scalapb:scalapb-runtime-grpc_2.12:0.11.20",
    ],
    strict_visibility = True,
)
use_repo(maven, "rules_proto_grpc_scala_maven_2_12")

maven.install(
    name = "rules_proto_grpc_scala_maven_2_13",  # Deconflict
    artifacts = [
        "com.thesamet.scalapb:compilerplugin_2.13:0.11.20",
        "com.thesamet.scalapb:scalapb-runtime_2.13:0.11.20",
        "com.thesamet.scalapb:scalapb-runtime-grpc_2.13:0.11.20",
    ],
    strict_visibility = True,
)
use_repo(maven, "rules_proto_grpc_scala_maven_2_13")

maven.install(
    name = "rules_proto_grpc_scala_maven_3",  # Deconflict
    artifacts = [
        "com.thesamet.scalapb:compilerplugin_3:0.11.20",
        "com.thesamet.scalapb:scalapb-runtime_3:0.11.20",
        "com.thesamet.scalapb:scalapb-runtime-grpc_3:0.11.20",
    ],
    strict_visibility = True,
)
use_repo(maven, "rules_proto_grpc_scala_maven_3")

scala_deps = use_extension("@rules_scala//scala/extensions:deps.bzl", "scala_deps")
scala_deps.scala()

scala_config = use_extension(
    "@rules_scala//scala/extensions:config.bzl",
    "scala_config",
)
use_repo(scala_config, "rules_scala_config")
